Micron Document
🎖️GitЯра🎖️

Node / meshtastic / Meshtastic-Android / files / core / model / src / commonMain / kotlin / org / meshtastic / core / model / MqttConnectionState.kt

Displaying Raw • Download

core/model/src/commonMain/kotlin/org/meshtastic/core/model/MqttConnectionState.kt 01cd54907d62cd90913d3d071b6bc240cae365ef (01cd5490) Text, 2.40 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.model

T8b949e/**
* App-level MQTT proxy connection state, decoupled from the MQTT library's internal type.
*
* Modeled as a sealed class so disconnect / reconnect events can carry diagnostic context — the user-facing reason for
* an unexpected disconnect, or the most recent reconnect attempt failure — without requiring downstream consumers to
* depend on the MQTT library's exception types.
*/
Tff7b72sealed Tff7b72class T56d364MqttConnectionState Tb4b4b4{
T8b949e/** The MQTT proxy has not been started (disabled or not yet initialized). */
Tff7b72data Tff7b72object T56d364Inactive Tb4b4b4: Te6edf3MqttConnectionStateTb4b4b4(Tb4b4b4)

T8b949e/** The MQTT client is actively connecting to the broker. */
Tff7b72data Tff7b72object T56d364Connecting Tb4b4b4: Te6edf3MqttConnectionStateTb4b4b4(Tb4b4b4)

T8b949e/** The MQTT client is connected and subscribed to topics. */
Tff7b72data Tff7b72object T56d364Connected Tb4b4b4: Te6edf3MqttConnectionStateTb4b4b4(Tb4b4b4)

T8b949e/**
* The MQTT client lost connection and is attempting to reconnect.
*
* @property attempt 1-based attempt counter for the current reconnect loop.
* @property lastError Localized message from the most recent reconnect failure, if any.
*/
Tff7b72data Tff7b72class T56d364ReconnectingTb4b4b4(Tff7b72val Te6edf3attemptTb4b4b4: Tffa657Int Tff7b72= T79c0ff0Tb4b4b4, Tff7b72val Te6edf3lastErrorTb4b4b4: Tffa657String? Tff7b72= Tff7b72nullTb4b4b4) Tb4b4b4: Te6edf3MqttConnectionStateTb4b4b4(Tb4b4b4)

T8b949e/**
* The MQTT client is not connected to the broker.
*
* @property reason Localized failure message for an unexpected disconnect, or `null` for the idle / initial /
* intentional-close case (use [Idle]).
*/
Tff7b72data Tff7b72class T56d364DisconnectedTb4b4b4(Tff7b72val Te6edf3reasonTb4b4b4: Tffa657String? Tff7b72= Tff7b72nullTb4b4b4) Tb4b4b4: Te6edf3MqttConnectionStateTb4b4b4(Tb4b4b4) Tb4b4b4{
Tff7b72companion Tff7b72object Tb4b4b4{
T8b949e/** Singleton for the idle / no-reason disconnected state. */
Tff7b72val Te6edf3IdleTb4b4b4: Te6edf3Disconnected Tff7b72= Te6edf3DisconnectedTb4b4b4(Te6edf3reason Tff7b72= Tff7b72nullTb4b4b4)
Tb4b4b4}
Tb4b4b4}
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.04s